package sample.chapter7.generic;

import java.util.List;

public class RentalGeneric<T>
{
	private int maxNum;
	private List<T> rentalPool;
	
	public RentalGeneric(int maxNum, List<T> rentalPool)
	{
		this.maxNum = maxNum;
		this.rentalPool = rentalPool;
	}
	
	public T getRental()
	{
		return rentalPool.get(0);
	}
	
	public void returnRental(T returnedThing)
	{
		rentalPool.add(returnedThing);
	}
	
	public List<T> getRentalPool()
	{
		return this.rentalPool;
	}
}
